//
//  EJSMineCollectionViewCell.m
//  24Gou
//
//  Created by lifayu on 2018/11/2.
//  Copyright © 2018 lifayu. All rights reserved.
//

#import "EJSMineCollectionViewCell.h"


@implementation EJSMineCollectionViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setToolModel:(EJSMineToolModel *)toolModel{
    _toolModel = toolModel;
    self.itemNameLabel.text = _toolModel.itemTitle;
    self.itemImageView.image = [UIImage imageNamed:_toolModel.itemImageName];
    if(_toolModel.count > 0){
        self.itemCountLabel.hidden = NO;
        self.itemCountLabel.text = @(_toolModel.count).stringValue;
        if(_toolModel.count > 99){
            self.itemCountLabel.text = @(99).stringValue;
        }
    }else{
        self.itemCountLabel.hidden = YES;
    }
}

@end
